-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Updating widows arm visibility #5919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This is really a patch made by @baburton. This checks if we are compiling on widows with arm and if so we export default visibility.
|
@K20shores @baburton do you think this change is a good & proper fix long term? What's your opinion on the stale #4072? Basically what I'm asking:
I really have no idea at this minute. How much trouble is it to add one Windows ARM job to the CI here? |
In my patch I add The reasons:
So: I expect that where my patch used This would expand the patch to cover windows/x64 builds that use msys2 with gcc or clang. Unfortunately I cannot test this myself, since msys2 does not install on my windows x64 VMs. From my past experience, windows/x64/gcc was already working, and I had never tried windows/x64/clang. (The build failure being discussed here was on windows/arm64/clang, and msys2 does not provide a windows/arm64/gcc option at all).
Issue #4072 appears to be about widespread changes to the visibility attributes used in pybind11 - for this I have no informed opinion I'm afraid (I don't know enough about the pros, cons and behaviour of different visibility flags under different linkers on different platforms). |
|
Oh, wow ... there seems to be a lot more uncertainty than I assumed originally. We need a least one firm use case to make a change here. A minimum would be logs to show what the original problem was on a well-defined platform. Much better would be to
|
|
@rwgk To be clear: pybind11 is indeed currently broken on windows/arm64/msys2+clang (you can see the build error in #5883, and both @K20shores and myself have experienced this exact error), and adding The uncertainty you mention was my attempt to predict how this patch will affect other platforms, most of which I am not able to test myself (like you, I port software to windows; I am not a native windows developer). I am not familiar with the GitHub CI system, or how pybind11 uses it, so this is something I will not be able to help with. However, if your CI system includes a windows/arm64/msys+clang platform then you should be able to see both the failure before the patch and the fix after the patch. If your CI system includes other platforms then you should be able to see what I am just predicting about the suggested patch (i.e., that it does not break other platforms). To be clear, the patch I'm suggesting is the one attached below, which hides the (very simple) change behind compile-time tests for windows and a GNU-like compiler (so gcc or clang). This should clearly not affect other platforms (e.g., linux or macOS) or other compilers (e.g., MSVC++), and so if your CI system includes other windows/msys setups (e.g., windows/x86/msys+mingw64 and windows/x86/msys+clang) then this should give you strong confidence in the patch. I've attached the patch again here, including my edits above (so replacing |
Sounds awesome, that’s exactly what we need to keep things clean and well-tested here. |
Description
This fixes #5883.
Really, I've just applied the patch that @baburton pasted in the mentioned issue
This checks whether we are compiling on Windows with ARM; if so, we export default visibility.
You can see passing actions that build on arm-windows in this successful github action in my scratch repository, so it appears to work
Suggested changelog entry:
Exports default visibility on ARM-based Windows builds